package com.example.app2024.temp;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import com.example.app2024.R;

public class tempActivity extends AppCompatActivity
{
      EditText view ;
      int anInt ;
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_temp);
            view = findViewById(R.id.tv_temp001);
            handler.sendEmptyMessageDelayed(0, 3000);
            
      }
      
      private Handler handler = new Handler()
      {
            @Override
            public void handleMessage(Message msg)
            {
                  super.handleMessage(msg);
                  view.setText("bbbbbbb" + anInt++);
                  //延迟发消息
                  handler.sendEmptyMessageDelayed(0, 4000);
            }
      };
      
}